home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12895 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 75 78 | 35 2e 63 73 6f 2e 75 69 |Path: ux|5.cso.ui|
|00000010| 75 63 2e 65 64 75 21 6d | 74 72 61 76 69 73 0a 46 |uc.edu!m|travis.F|
|00000020| 72 6f 6d 3a 20 4d 61 74 | 74 68 65 77 20 54 72 61 |rom: Mat|thew Tra|
|00000030| 76 69 73 20 3c 6d 74 72 | 61 76 69 73 40 73 74 75 |vis <mtr|avis@stu|
|00000040| 64 65 6e 74 73 2e 75 69 | 75 63 2e 65 64 75 3e 0a |dents.ui|uc.edu>.|
|00000050| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000060| 2e 6f 62 6a 65 63 74 2c | 63 6f 6d 70 2e 6c 61 6e |.object,|comp.lan|
|00000070| 67 2e 65 69 66 66 65 6c | 2c 63 6f 6d 70 2e 6c 61 |g.eiffel|,comp.la|
|00000080| 6e 67 2e 63 2b 2b 2c 63 | 6f 6d 70 2e 6c 61 6e 67 |ng.c++,c|omp.lang|
|00000090| 2e 62 65 74 61 2c 63 6f | 6d 70 2e 6c 61 6e 67 2e |.beta,co|mp.lang.|
|000000a0| 6a 61 76 61 2c 63 6f 6d | 70 2e 6c 61 6e 67 2e 73 |java,com|p.lang.s|
|000000b0| 61 74 68 65 72 0a 53 75 | 62 6a 65 63 74 3a 20 52 |ather.Su|bject: R|
|000000c0| 65 3a 20 57 68 61 74 20 | 53 68 6f 75 6c 64 20 41 |e: What |Should A|
|000000d0| 6e 20 45 78 63 65 70 74 | 69 6f 6e 20 48 61 6e 64 |n Except|ion Hand|
|000000e0| 6c 69 6e 67 20 44 6f 3f | 20 2d 2d 20 43 6c 61 72 |ling Do?| -- Clar|
|000000f0| 69 66 69 63 61 74 69 6f | 6e 20 6f 66 20 72 75 6c |ificatio|n of rul|
|00000100| 65 73 0a 44 61 74 65 3a | 20 46 72 69 2c 20 32 32 |es.Date:| Fri, 22|
|00000110| 20 4d 61 72 20 31 39 39 | 36 20 30 34 3a 32 34 3a | Mar 199|6 04:24:|
|00000120| 35 31 20 2d 30 36 30 30 | 0a 4f 72 67 61 6e 69 7a |51 -0600|.Organiz|
|00000130| 61 74 69 6f 6e 3a 20 55 | 6e 69 76 65 72 73 69 74 |ation: U|niversit|
|00000140| 79 20 6f 66 20 49 6c 6c | 69 6e 6f 69 73 20 61 74 |y of Ill|inois at|
|00000150| 20 55 72 62 61 6e 61 0a | 4d 65 73 73 61 67 65 2d | Urbana.|Message-|
|00000160| 49 44 3a 20 3c 50 69 6e | 65 2e 53 6f 6c 61 2e 33 |ID: <Pin|e.Sola.3|
|00000170| 2e 39 31 2e 39 36 30 33 | 32 32 30 34 31 33 34 35 |.91.9603|22041345|
|00000180| 2e 31 37 37 31 31 43 2d | 31 30 30 30 30 30 40 75 |.17711C-|100000@u|
|00000190| 78 35 2e 63 73 6f 2e 75 | 69 75 63 2e 65 64 75 3e |x5.cso.u|iuc.edu>|
|000001a0| 0a 52 65 66 65 72 65 6e | 63 65 73 3a 20 3c 31 39 |.Referen|ces: <19|
|000001b0| 39 36 4d 61 72 31 34 2e | 31 35 35 36 34 31 2e 34 |96Mar14.|155641.4|
|000001c0| 32 39 39 40 73 63 68 62 | 62 73 2e 6d 6f 74 2e 63 |299@schb|bs.mot.c|
|000001d0| 6f 6d 3e 20 3c 34 69 72 | 6e 31 31 24 37 6c 6e 40 |om> <4ir|n11$7ln@|
|000001e0| 6d 69 6d 61 73 2e 62 72 | 75 6e 65 6c 2e 61 63 2e |mimas.br|unel.ac.|
|000001f0| 75 6b 3e 0a 4e 4e 54 50 | 2d 50 6f 73 74 69 6e 67 |uk>.NNTP|-Posting|
|00000200| 2d 48 6f 73 74 3a 20 75 | 78 35 2e 63 73 6f 2e 75 |-Host: u|x5.cso.u|
|00000210| 69 75 63 2e 65 64 75 0a | 4d 69 6d 65 2d 56 65 72 |iuc.edu.|Mime-Ver|
|00000220| 73 69 6f 6e 3a 20 31 2e | 30 0a 43 6f 6e 74 65 6e |sion: 1.|0.Conten|
|00000230| 74 2d 54 79 70 65 3a 20 | 54 45 58 54 2f 50 4c 41 |t-Type: |TEXT/PLA|
|00000240| 49 4e 3b 20 63 68 61 72 | 73 65 74 3d 55 53 2d 41 |IN; char|set=US-A|
|00000250| 53 43 49 49 0a 58 2d 53 | 65 6e 64 65 72 3a 20 6d |SCII.X-S|ender: m|
|00000260| 74 72 61 76 69 73 40 75 | 78 35 2e 63 73 6f 2e 75 |travis@u|x5.cso.u|
|00000270| 69 75 63 2e 65 64 75 0a | 49 6e 2d 52 65 70 6c 79 |iuc.edu.|In-Reply|
|00000280| 2d 54 6f 3a 20 3c 34 69 | 72 6e 31 31 24 37 6c 6e |-To: <4i|rn11$7ln|
|00000290| 40 6d 69 6d 61 73 2e 62 | 72 75 6e 65 6c 2e 61 63 |@mimas.b|runel.ac|
|000002a0| 2e 75 6b 3e 0a 0a 48 27 | 6c 6c 6f 2c 0a 09 66 6f |.uk>..H'|llo,..fo|
|000002b0| 72 20 63 6c 61 72 69 66 | 69 63 61 74 69 6f 6e 2c |r clarif|ication,|
|000002c0| 20 4a 61 76 61 20 75 73 | 65 73 20 74 68 65 20 73 | Java us|es the s|
|000002d0| 61 6d 65 20 65 78 63 65 | 70 74 69 6f 6e 20 68 61 |ame exce|ption ha|
|000002e0| 6e 64 6c 69 6e 67 20 0a | 6d 65 63 68 61 6e 69 73 |ndling .|mechanis|
|000002f0| 6d 20 61 73 20 43 2b 2b | 20 28 77 69 74 68 20 74 |m as C++| (with t|
|00000300| 68 65 20 61 64 64 69 74 | 69 6f 6e 20 6f 66 20 74 |he addit|ion of t|
|00000310| 68 65 20 66 69 6e 61 6c | 6c 79 20 63 6c 61 75 73 |he final|ly claus|
|00000320| 65 29 2e 20 54 68 65 20 | 74 77 6f 20 0a 70 6f 73 |e). The |two .pos|
|00000330| 73 69 62 6c 65 20 6d 65 | 63 68 61 6e 69 73 6d 73 |sible me|chanisms|
|00000340| 20 61 72 65 20 22 72 65 | 73 75 6d 70 74 69 6f 6e | are "re|sumption|
|00000350| 22 20 61 6e 64 20 22 74 | 65 72 6d 69 6e 61 74 69 |" and "t|erminati|
|00000360| 6f 6e 22 2e 20 41 20 71 | 75 6f 74 65 20 66 72 6f |on". A q|uote fro|
|00000370| 6d 20 74 68 65 20 20 0a | 22 41 6e 6e 6f 74 61 74 |m the .|"Annotat|
|00000380| 65 64 20 43 2b 2b 20 52 | 65 66 65 72 65 6e 63 65 |ed C++ R|eference|
|00000390| 20 4d 61 6e 75 61 6c 22 | 20 73 74 61 74 65 73 3a | Manual"| states:|
|000003a0| 0a 0a 09 22 45 78 63 65 | 70 74 69 6f 6e 20 68 61 |..."Exce|ption ha|
|000003b0| 6e 64 6c 69 6e 67 20 69 | 73 20 69 6e 74 65 6e 64 |ndling i|s intend|
|000003c0| 65 64 20 74 6f 20 61 6c | 6c 6f 77 20 63 6f 64 65 |ed to al|low code|
|000003d0| 20 74 68 61 74 20 68 61 | 73 20 65 6e 63 6f 75 6e | that ha|s encoun|
|000003e0| 74 65 72 65 64 20 0a 61 | 20 63 6f 6e 64 69 74 69 |tered .a| conditi|
|000003f0| 6f 6e 20 69 74 20 63 61 | 6e 6e 6f 74 20 63 6f 70 |on it ca|nnot cop|
|00000400| 65 20 77 69 74 68 20 74 | 6f 20 72 65 74 75 72 6e |e with t|o return|
|00000410| 20 74 6f 20 73 6f 6d 65 | 20 6f 74 68 65 72 20 63 | to some| other c|
|00000420| 6f 64 65 20 74 68 61 74 | 20 0a 64 69 72 65 63 74 |ode that| .direct|
|00000430| 6c 79 20 6f 72 20 69 6e | 64 69 72 65 63 74 6c 79 |ly or in|directly|
|00000440| 20 69 6e 76 6f 6b 65 64 | 20 69 74 2e 20 54 68 65 | invoked| it. The|
|00000450| 72 65 20 69 73 20 6e 6f | 20 77 61 79 20 66 6f 72 |re is no| way for|
|00000460| 20 61 6e 20 65 78 63 65 | 70 74 69 6f 6e 20 0a 68 | an exce|ption .h|
|00000470| 61 6e 64 6c 65 72 20 74 | 6f 20 72 65 71 75 65 73 |andler t|o reques|
|00000480| 74 20 74 68 65 20 74 68 | 72 65 61 64 20 6f 66 20 |t the th|read of |
|00000490| 63 6f 6e 74 72 6f 6c 20 | 74 6f 20 72 65 73 75 6d |control |to resum|
|000004a0| 65 20 66 72 6f 6d 20 74 | 68 65 20 74 68 72 6f 77 |e from t|he throw|
|000004b0| 20 70 6f 69 6e 74 2e 20 | 0a 49 6e 20 6f 74 68 65 | point. |.In othe|
|000004c0| 72 20 77 6f 72 64 73 2c | 20 22 74 68 72 6f 77 22 |r words,| "throw"|
|000004d0| 20 69 6d 70 6c 65 6d 65 | 6e 74 73 20 74 68 65 20 | impleme|nts the |
|000004e0| 74 65 72 6d 69 6e 61 74 | 69 6f 6e 20 6d 6f 64 65 |terminat|ion mode|
|000004f0| 6c 20 6f 66 20 65 78 63 | 65 70 74 69 6f 6e 20 0a |l of exc|eption .|
|00000500| 68 61 6e 64 6c 69 6e 67 | 2e 22 20 20 20 20 20 2d |handling|." -|
|00000510| 41 52 4d 2c 20 45 6c 6c | 69 73 20 26 20 53 74 72 |ARM, Ell|is & Str|
|00000520| 6f 75 73 74 72 75 70 2c | 20 70 61 67 65 20 33 35 |oustrup,| page 35|
|00000530| 34 0a 0a 54 68 69 73 20 | 6d 6f 64 65 6c 20 68 61 |4..This |model ha|
|00000540| 73 20 62 65 65 6e 20 61 | 63 63 65 70 74 65 64 20 |s been a|ccepted |
|00000550| 69 6e 74 6f 20 74 68 65 | 20 64 72 61 66 74 20 43 |into the| draft C|
|00000560| 2b 2b 20 73 74 61 6e 64 | 61 72 64 20 61 6e 64 20 |++ stand|ard and |
|00000570| 69 73 20 61 6c 73 6f 20 | 74 68 65 20 0a 6d 6f 64 |is also |the .mod|
|00000580| 65 6c 20 4a 61 76 61 20 | 75 73 65 73 2e 20 54 68 |el Java |uses. Th|
|00000590| 65 20 70 68 69 6c 6f 73 | 6f 70 68 79 20 69 73 20 |e philos|ophy is |
|000005a0| 74 68 61 74 20 61 6e 20 | 65 78 63 65 70 74 69 6f |that an |exceptio|
|000005b0| 6e 20 69 6e 64 69 63 61 | 74 65 73 20 73 6f 6d 65 |n indica|tes some|
|000005c0| 20 65 72 72 6f 72 20 0a | 63 6f 6e 64 69 74 69 6f | error .|conditio|
|000005d0| 6e 20 74 68 61 74 20 69 | 73 20 75 73 75 61 6c 6c |n that i|s usuall|
|000005e0| 79 20 75 6e 72 65 63 6f | 76 65 72 61 62 6c 65 20 |y unreco|verable |
|000005f0| 61 6e 64 20 63 6f 64 65 | 20 74 68 61 74 20 69 73 |and code| that is|
|00000600| 20 69 6e 20 65 72 72 6f | 72 20 73 68 6f 75 6c 64 | in erro|r should|
|00000610| 20 0a 74 65 72 6d 69 6e | 61 74 65 20 28 74 68 69 | .termin|ate (thi|
|00000620| 6e 6b 69 6e 67 20 61 62 | 6f 75 74 20 69 74 20 6c |nking ab|out it l|
|00000630| 6f 67 69 63 61 6c 6c 79 | 29 2e 20 50 75 74 20 61 |ogically|). Put a|
|00000640| 6e 6f 74 68 65 72 20 77 | 61 79 2c 20 61 6e 20 65 |nother w|ay, an e|
|00000650| 78 63 65 70 74 69 6f 6e | 20 0a 77 69 6c 6c 20 63 |xception| .will c|
|00000660| 61 75 73 65 20 74 68 65 | 20 74 68 72 65 61 64 20 |ause the| thread |
|00000670| 6f 66 20 65 78 65 63 75 | 74 69 6f 6e 20 74 6f 20 |of execu|tion to |
|00000680| 74 65 72 6d 69 6e 61 74 | 65 2c 20 70 65 72 69 6f |terminat|e, perio|
|00000690| 64 2c 20 61 6e 64 20 74 | 68 65 20 65 78 63 65 70 |d, and t|he excep|
|000006a0| 74 69 6f 6e 20 0a 68 61 | 6e 64 6c 65 72 20 69 73 |tion .ha|ndler is|
|000006b0| 20 74 68 65 20 70 6c 61 | 63 65 20 74 6f 20 64 6f | the pla|ce to do|
|000006c0| 20 63 6c 65 61 6e 75 70 | 20 61 6e 64 20 65 6e 73 | cleanup| and ens|
|000006d0| 75 72 65 20 61 20 67 72 | 61 63 65 66 75 6c 20 65 |ure a gr|aceful e|
|000006e0| 78 69 74 2e 20 49 66 20 | 74 68 65 20 0a 65 78 63 |xit. If |the .exc|
|000006f0| 65 70 74 69 6f 6e 20 69 | 73 20 73 6f 6d 65 74 68 |eption i|s someth|
|00000700| 69 6e 67 20 74 68 61 74 | 20 69 73 20 72 65 63 6f |ing that| is reco|
|00000710| 76 65 72 61 62 6c 65 2c | 20 73 75 63 68 20 61 73 |verable,| such as|
|00000720| 20 61 20 75 73 65 72 20 | 65 6e 74 65 72 69 6e 67 | a user |entering|
|00000730| 20 35 2f 30 20 69 6e 20 | 61 20 0a 63 61 6c 63 75 | 5/0 in |a .calcu|
|00000740| 6c 61 74 6f 72 20 70 72 | 6f 67 72 61 6d 2c 20 74 |lator pr|ogram, t|
|00000750| 68 65 6e 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 74 |hen you |should t|
|00000760| 61 6b 65 20 63 61 72 65 | 20 6f 66 20 74 68 61 74 |ake care| of that|
|00000770| 20 62 65 66 6f 72 65 20 | 61 6e 20 65 78 63 65 70 | before |an excep|
|00000780| 74 69 6f 6e 20 0a 69 73 | 20 74 68 72 6f 77 6e 2e |tion .is| thrown.|
|00000790| 20 45 78 63 65 70 74 69 | 6f 6e 73 20 73 68 6f 75 | Excepti|ons shou|
|000007a0| 6c 64 20 6f 6e 6c 79 20 | 62 65 20 74 68 72 6f 77 |ld only |be throw|
|000007b0| 6e 20 66 6f 72 20 75 6e | 68 61 6e 64 6c 65 2d 61 |n for un|handle-a|
|000007c0| 62 6c 65 20 63 6f 6e 64 | 69 74 69 6f 6e 73 2e 0a |ble cond|itions..|
|000007d0| 0a 43 61 72 70 65 20 64 | 69 65 6d 2c 0a 4d 61 74 |.Carpe d|iem,.Mat|
|000007e0| 74 68 65 77 0a 0a 4f 6e | 20 32 31 20 4d 61 72 20 |thew..On| 21 Mar |
|000007f0| 31 39 39 36 2c 20 46 72 | 61 6e 63 65 73 63 6f 20 |1996, Fr|ancesco |
|00000800| 46 61 6e 74 61 75 7a 7a | 69 20 77 72 6f 74 65 3a |Fantauzz|i wrote:|
|00000810| 0a 0a 3e 20 73 68 61 6e | 67 40 63 6f 72 70 2e 6d |..> shan|g@corp.m|
|00000820| 6f 74 2e 63 6f 6d 20 28 | 44 61 76 69 64 20 4c 2e |ot.com (|David L.|
|00000830| 20 53 68 61 6e 67 29 20 | 77 72 6f 74 65 3a 0a 3e | Shang) |wrote:.>|
|00000840| 20 3e 0a 3e 20 3e 20 5b | 2e 2e 2e 5d 0a 3e 20 3e | >.> > [|...].> >|
|00000850| 42 75 74 2c 20 6d 6f 73 | 74 20 65 78 63 65 70 74 |But, mos|t except|
|00000860| 69 6f 6e 20 68 61 6e 64 | 6c 69 6e 67 20 6d 65 63 |ion hand|ling mec|
|00000870| 68 61 6e 69 73 6d 73 20 | 66 6f 63 75 73 20 6f 6e |hanisms |focus on|
|00000880| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 63 61 73 65 | the sec|ond case|
|00000890| 2c 0a 3e 20 3e 77 68 69 | 63 68 20 6d 61 6b 65 73 |,.> >whi|ch makes|
|000008a0| 20 65 78 63 65 70 74 69 | 6f 6e 20 68 61 6e 64 6c | excepti|on handl|
|000008b0| 69 6e 67 20 76 65 72 79 | 20 63 6f 6d 70 6c 69 63 |ing very| complic|
|000008c0| 61 74 65 64 20 66 6f 72 | 20 72 65 63 6f 76 65 72 |ated for| recover|
|000008d0| 79 2e 20 28 43 2b 2b 0a | 3e 20 3e 65 76 65 6e 20 |y. (C++.|> >even |
|000008e0| 67 69 76 65 73 20 75 70 | 20 72 65 63 6f 76 65 72 |gives up| recover|
|000008f0| 79 2e 29 20 5b 2e 2e 2e | 5d 0a 3e 20 0a 3e 20 20 |y.) [...|].> .> |
|00000900| 5e 5e 5e 5e 5e 2d 2d 2d | 2d 2d 2d 2d 20 54 68 69 |^^^^^---|---- Thi|
|00000910| 73 20 69 73 6e 27 74 20 | 72 65 61 6c 6c 79 20 74 |s isn't |really t|
|00000920| 72 75 65 20 28 69 66 20 | 49 20 68 61 76 65 20 75 |rue (if |I have u|
|00000930| 6e 64 65 72 73 74 6f 6f | 64 20 77 68 61 74 20 79 |nderstoo|d what y|
|00000940| 6f 75 20 0a 3e 20 6d 65 | 61 6e 29 2e 20 59 6f 75 |ou .> me|an). You|
|00000950| 20 63 61 6e 20 72 65 61 | 64 20 61 20 64 69 73 73 | can rea|d a diss|
|00000960| 65 72 74 61 74 69 6f 6e | 20 61 62 6f 75 74 20 74 |ertation| about t|
|00000970| 68 61 74 20 69 6e 20 22 | 54 68 65 20 44 65 73 69 |hat in "|The Desi|
|00000980| 67 6e 20 61 6e 64 20 0a | 3e 20 45 76 6f 6c 75 74 |gn and .|> Evolut|
|00000990| 69 6f 6e 20 6f 66 20 43 | 2b 2b 22 2c 20 62 79 20 |ion of C|++", by |
|000009a0| 42 2e 53 2e 0a 3e 20 0a | 3e 20 46 72 61 6e 63 65 |B.S..> .|> France|
|000009b0| 73 63 6f 20 47 2e 20 46 | 61 6e 74 61 75 7a 7a 69 |sco G. F|antauzzi|
|000009c0| 0a 3e 20 0a 3e 20 0a 3e | 20 0a 3e 20 0a 3e 20 0a |.> .> .>| .> .> .|
|000009d0| 0a 4d 61 74 74 68 65 77 | 20 54 72 61 76 69 73 2c |.Matthew| Travis,|
|000009e0| 20 20 20 6d 74 72 61 76 | 69 73 40 75 69 75 63 2e | mtrav|is@uiuc.|
|000009f0| 65 64 75 20 20 20 20 20 | 68 74 74 70 3a 2f 2f 77 |edu |http://w|
|00000a00| 77 77 2e 73 74 75 64 65 | 6e 74 73 2e 75 69 75 63 |ww.stude|nts.uiuc|
|00000a10| 2e 65 64 75 2f 7e 6d 74 | 72 61 76 69 73 0a 0a 49 |.edu/~mt|ravis..I|
|00000a20| 66 20 74 68 65 20 77 68 | 69 6c 65 20 49 20 74 68 |f the wh|ile I th|
|00000a30| 69 6e 6b 20 6f 6e 20 74 | 68 65 65 2c 20 64 65 61 |ink on t|hee, dea|
|00000a40| 72 20 66 72 69 65 6e 64 | 0a 41 6c 6c 20 6c 6f 73 |r friend|.All los|
|00000a50| 73 65 73 20 72 65 73 74 | 6f 72 65 64 2c 20 61 6e |ses rest|ored, an|
|00000a60| 64 20 73 6f 72 72 6f 77 | 73 20 65 6e 64 2e 20 20 |d sorrow|s end. |
|00000a70| 20 20 20 20 2d 54 65 6e | 6e 79 73 6f 6e 0a 0a | -Ten|nyson.. |
+--------+-------------------------+-------------------------+--------+--------+